package com.avetti.commerce.webservices;

import java.util.List;

import org.codehaus.xfire.fault.XFireFault;

/**
 * @author Administrator
 *
 */
public interface CategoryService {
    /**
     * Create a new category. If SOAP header vendor id is not equals to category
     * vendor id, nothing to do.
     * @param category a new category object, vendorId and category name
     * must be specified
     * @param context SOAP message context
     * @throws XFireFault is case of category creating error: category exists
     * or no vendor id specified
     */
    public void create(Categories category)throws XFireFault;
    
    /**
     * Remove category. If SOAP header vendor id not equal to category vendor 
     * id - nothing to do.
     * @param category category to remove
     * @param context SOAP message context
     */
    public void delete(Categories category);
    
    /**
     * Find an items identifiers of items, which attach to specified category.
     * A value "position" field of "catitem" table order an item identifiers  
     * @param category category
     * @param context SOAP message context
     * @return list of item identifiers, which is attached to category
     */
    public List<Long> findItemsId(Categories category);
}
